/**
 * Created by JasonChou on 16/4/28.
 */
import {router} from './router.js';
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueResource from 'vue-resource';
import Auth from './services/auth';
Vue.use(VueResource);

import {wx} from './libs/wx'
import {} from './filters/dateFormat';
import {} from './filters/parseCity';

import {Wx} from './services/wx';

import RootView from './components/root.vue';

router.go = function (path) {
    refreshCache[path.name] = true;

    this.__proto__.go.call(this, path);
};
router.start(RootView, 'app');

Wx.fixAndroidPaySafeUrlBug();

Auth.autoLogin();

Vue.directive('dom', {
    update: function (value) {
        //console.log(this.params.scrollHeight); // -> "hi"
        if (this.vm.doms == null)
            this.vm.doms = {};
        this.vm.doms[value] = this.el;
    }
});